package com.jie.component.validation.annotion;

import com.jie.component.validation.enums.PhoneType;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 
 * @author jie
 * @version 1.0 2025-02-11
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Phone {
    /**
     * 验证失败时的消息
     */
    String message() default "手机号格式错误";

    /**
     * 是否必须
     */
    boolean required() default true;

    /**
     * 电话类型
     */
    PhoneType type() default PhoneType.ALL;
}
